import App from './App'
import plugin from "@/plugin/index.js"
// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import store from './store'

import './uni.promisify.adaptor'
Vue.config.productionTip = false
Vue.use(plugin)
Vue.use(uView)

let $on = uni.$on;
uni.$on = (eventName, obj) => {
	try {
		uni.$off(eventName);
	} catch (error) { }
	$on(eventName, obj);
}


App.mpType = 'app'
const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app,
		store
	}
}
// #endif